How should I design my database API commands? [closed]

Posted by WebDev on Programmers See other posts from Programmers or by WebDev
Published on 2010-12-24T06:45:30Z Indexed on 2012/05/30 22:50 UTC
Read the original article Hit count: 457

Filed under:
|
|
|

I am developing a database API for a project, with commands for getting data from the database. For example, I have one gib table, so the command for that is:

getgib name  alias limit fields

If the user pass their name:

getgib rahul 

Then it will return all gib data whose name is like rahul. If an alias is given then it will return all the gib owned by the user whose alias (userid) was given. I want to design the commands:

  • limit: to limit the record in query,
  • fields: extra fields I want to add in the select query.

So now the commands are set, but:

  1. I want the gibs by the gibid, so how to make this or any suggestion to improve my command is welcome.

  2. If the user doesn't want to specify the name, and he wants only the gibs by providing alias, then what separator should I use instead of name?

© Programmers or respective owner

Related posts about php

Related posts about design